#include  "MesQueue.hpp"
#include "ChainOfResponsibility.hpp"
#include <iostream>
#include <string>

int main()
{
    Server serve;
    std::string text; //文本内容 
    Enter he; //责任链进入入口
    while(true)
    {
        //如果阻塞队列为空，那么阻塞等待
        serve.receive(ClientType, &text);
        std::cout << "Serve get a message: " << text << std::endl;
        if(text == "exit")
        {
            break;
        }
        //消息的处理
        he.Run(text);
    }
    return 0;
}